﻿using Domain.Entity;
using Domain.Entity.Basic_information;
using Domain.Entity.System_dictionary;
using Domain.Entity.System_numbering;
using Domain.Entity.System_operation;
using Domain.Entity.System_Ordermanagement;
using Domain.Entity.System_setting;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Data;

namespace EFCore
{
    public class MyDbContext : DbContext
    {
        public readonly string _connectionString;
        public MyDbContext(DbContextOptions options) : base(options)
        {
            var extension = options.FindExtension<SqlServerOptionsExtension>();
            _connectionString = extension?.ConnectionString;
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.ApplyConfigurationsFromAssembly(this.GetType().Assembly);
        }

        public DbSet<Test> Tests { get; set; }

        public DbSet<Ment_employee> Ment_employee { get; set; }

        public DbSet<Ment_menu> Ment_menu { get; set; }

        public DbSet<Ment_role> Ment_role { get; set; }

        public DbSet<Employee_role> Employee_role { get; set; }

        public DbSet<Role_menu> Role_menu { get; set; }

        public DbSet<Wb_meter> Wb_meter { get; set; }

        public DbSet<Orders> Orders { get; set; }

        public DbSet<Address_ment> address_Ments { get; set; }

        public DbSet<Cargo_ment> cargo_Ments { get; set;}

        public DbSet<Carrier_ment> carrier_Ments { get; set; }

        public DbSet<Customer_ment> customer_Ments { get; set; }

        public DbSet<Drivers_ment> drivers_Ments { get;set; }

        public DbSet<Vehicles_ment> vehicles_Ments { get;set;}
        public DbSet<Sys_dict_data> Sys_dict_datas { get;set;}
        public DbSet<Sys_dict_type> Sys_dict_types { get;set;}

        public DbSet<BH> BHs { get; set; }

        public DbSet<Children> childrens { get; set; }

        public DbSet<Info_company> Info_company { get; set; }

        public DbSet<Bill_ol> Bill_ols { get; set; }

        public DbSet<Ment_depart> Ment_depart { get; set; }
        public DbSet<Arrival_meter> Arrival_meter { get; set; }
        public DbSet<Signature_receipt> Signature_receipt { get; set; }
        public DbSet<Receipt_meter> Receipt_meter { get; set; }
    }
}
